package com.brillilab.service.module.message.template.impl.method;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: MethodToShareOtherTemp
 * @ProjectName brill_lab
 * @Description: 方法被管理员推荐给其他成员
 * @date 2019/5/27 19:45
 */
@Data
public class MethodToShareOtherTemp extends AbstractMessageTemplate {
    private String methodName;
    private String PIName;

    /**
     * 方法被管理员推荐给其他成员
     * @param labId       实验室ID
     * @param receiverId  接收人ID
     * @param labMemberId 接收者实验室成员Id
     * @param methodName  方法名称
     * @param PIName      管理员姓名
     */
    public MethodToShareOtherTemp(Long labId, Long receiverId, Long labMemberId, String methodName, String PIName,Long methodId) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.MethodToShareOther.getValue());
        super.setTitle("您的方法已被推荐");
        String content = String.format("<span>您的</span><span style='color:#F6AC2D'>%s</span><span>被</span>" +
                        "<span style='color:#F6AC2D'>%s</span><span>推荐给了实验室所有成员</span>",
                methodName, PIName);
        super.setContent(content);
        super.setAppContent(String.format("您的%s被%s推荐给了实验室所有成员",methodName, PIName));
        super.setReferId(methodId);
        this.labMemberId = labMemberId;
        this.methodName = methodName;
        this.PIName = PIName;
    }

}
